<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes();?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes();?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php wp_title(); ?></title>
<meta name="googlebot" content="noarchive" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="shortcut icon" href="<?php echo site_url(); ?>/favicon.ico" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php 
wp_head();
include_once('header_scripts.php');
?>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=624496657584158";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="main-content">
        <div class="row-fluid header-logo">
            <div class="logo">
                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
                        <?php
                            if ( function_exists( 'ot_get_option' ) ) {
                                $bg = ot_get_option('logo_head');
                                    if($bg && $bg['background-image']){ ?>
                                        <img src="<?php echo $bg['background-image'];?>" alt="Most coupons code"/>
                                   <?php }else{ ?>
                                        <img src="<?php echo get_stylesheet_directory_uri().'/img/logo/MostCoupon.png';?>"alt="Most Coupon code"/>
                                  <?php }
                                ?>            
                             <?php } 
                         ?>
                    </a>
            </div>
            <div class="search">
                <form class="form-wrapper cf" id="search_form" action="<?php echo home_url('/');?>" method="get">
                    <input type="text" name="s" class="searchinput" id="search-input" onfocus="if (this.value == 'Search by Store name or Event') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search by Store name or Event';}" value="Search by Store name or Event" autocomplete="off" />
                    <button class="buttonsearch" type="submit" id="search-button" ></button>
                </form>
            </div>
            <div class="registration">
                <?php
                global $user_ID,$user_identity;
                if(!$user_ID){?>
                    <div class="join join-bg">
                        <a id="sign-up">Join</a>
                    </div>
                    <div id="popup-bg-signup"></div>
                    <div id="signup">
                           <div id="signup-header" class="row-fluid">
                               <div class="span11">
                                   <div class="row-fluid">
                                       <div class="span6"><p class="create-acc">Create a new account</p></div>
                                       <div class="span6 acc_ready">
                                           <p>Already have an account? <span id="ready_user">Login</span></p>
                                       </div>
                                   </div>
                               </div>
                                <span class="modal_close"></span>
                           </div>
                            <form id="signup_form" name="signup_form" class="">
                                 <div class="txt-fld">
                                      <label>Username</label>
                                      <input id="name_signup" class="" name="txt_username_signup" type="text" />
                                      <span class="hiden is_exists">* is exists</span>
                                      <span class="hiden is_ready">* is ready</span>
                                 </div>
                                 <div class="txt-fld">
                                       <label>Email address</label>
                                       <input id="email_signup" name="txt_email" type="email" />
                                       <span class="hiden email_exists">* is exists</span>
                                       <span class="hiden email_ready">* is ready</span>
                                       <span class="hiden email_not_valid">* not valid</span>
                                 </div>
                                 <div class="txt-fld">
                                        <label class="check_cfpwd">Password</label>
                                        <input name="txt_pwd_up" type="password" />
                                 </div>
                                <div class="txt-fld">
                                       <label class="check_cfpwd">confirm Password</label>
                                       <input name="txt_cf_pwd" type="password" />
                                       <p class="hiden cf_pwd_false">Password confirm not match</p>
                                 </div>
                                 <div class="btn-fld">
                                        <input type="hidden" name="redirect_to" value="<?php echo cpx_current_url(); ?>" />
                                        <button name="btn_signup" type="submit">Sign Up &raquo;</button>
                                 </div>
                           </form>
                   </div>
                    <div class="login login-bg">
                         <a id="sign-in">Login</a>
                    </div>
                    <div id="popup-bg-signin"></div>
                    <div id="login">
                         <div id="signin-header" class="row-fluid pophead">
                              <div class="span9 jointop">
                                   <div class="row-fluid">
                                       <div class="span6">
                                           <p class="joinheader">Login</p>
                                       </div>
                                       <div class="span6 have_acc">
                                           <p>Don't have an account? <span id="join">Join</span></p>
                                       </div>
                                   </div>

                             </div>                        
                             <span class="modal_close"></span>
                         </div>
<!--                         <div class="row-fluid">
                             <a id="signupface" class="signin-fb" href="#">Login with facebook</a>
                         </div>
                         <hr class="signupline">     -->
                             <p class="signuptitle">Or login with your account</p>
                             <p class="hiden login_fail">*user name or password not correct, please try again</p>
                             <form id="login_form" name="login_form"  class="signupform">
                               <div class="row-fluid signuplabel">User name</div>
                               <div class="row-fluid signupin"><input type="text" name="txt_username" /></div>
                               <div class="row-fluid signuplabel">Password</div>
                               <div class="row-fluid signupin"><input type="password" name="txt_pwd" /></div>
                               <div class="row-fluid remember">
                                   <label for="rememberme">
                                       <input name="rememberme" type="checkbox" id="rememberme" value="forever"/> Remember Me
                                   </label>
                               </div>
                               <input type="hidden" name="redirect_to" value="<?php echo cpx_current_url(); ?>" />
                               <input type="hidden" name="user-cookie" value="forever" />
                               <div class="signupsub">
                                   <input type="submit" name="btn_login" value="Login" />
                               </div>
<!--                               <div class="forgot_pwd">
                                    <a href="">Forgot my password</a>
                               </div>-->
                             </form>	
                   </div>
                <?php }else{?>
                                <div class="sidebox loged">
                                        <div class="userinfo">
                                            <p class="user-name">Howdy <strong class="name"><a href="<?php echo admin_url('/profile.php');?>" title="Edit your profile"><?php echo $user_identity; ?></a></strong></p>
                                            <p class="user-manager">
                                                <a class="logout" href="<?php echo wp_logout_url(site_url());?>">Log out</a>
                                            <?php
                                                if (is_user_logged_in()) {
                                                    echo '<span>|</span> <a class="p12" title="Go to Dashboard" href="' . admin_url() . '">' . __('Dashboard') . '</a>';
                                                }
                                            ?>
                                                </p>
                                        </div>
                                </div>
                <?php }
                ?>
            </div>
        </div>
        <div class="row-fluid">
            <div class="row-fluid nava">
                <div class="span9">
                    <header id="masthead" class="site-header" role="banner">
                            <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-ul' ) ); ?>                        
                            <?php $header_image = get_header_image();
                                  if ( ! empty( $header_image ) ) : ?>
                                  <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
                            <?php endif; ?>
                    </header>          
                </div>
                <div class="browse-category">
                    <div class="float-right category">
                        <a href="<?php echo site_url().'/categories-listing';?>">Browse by Category </a>
                    </div>
                </div>
            </div>
        </div>

	
		